package cn.yotta.user.core.server.iface.common;

/**
 * @author wyaoyao
 * @date 2022/11/9 16:10
 * 验证码存储策略
 */
public interface CaptchaStorageStrategy {

    /**
     * 保存图片验证码
     *
     * @param captcha captcha info
     * @return captcha token
     */
    String save(CaptchaGenerator.Captcha captcha);

    /**
     * 根据token获取图片验证码
     *
     * @param token captcha info
     * @return captcha token
     */
    CaptchaGenerator.Captcha get(String token);

}
